package com.czkt.shop.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.czkt.shop.pojo.SkuImg;
import com.czkt.shop.mapper.SkuImgMapper;
import com.czkt.shop.service.ISkuImgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author baomidou
 * @since 2024-09-04
 */
@Service
public class SkuImgServiceImpl extends ServiceImpl<SkuImgMapper, SkuImg> implements ISkuImgService {


    @Override
    public List<SkuImg> list(Integer skuId) {

        LambdaQueryWrapper<SkuImg> queryWrapper = new LambdaQueryWrapper<>();

        queryWrapper.eq(skuId != null,SkuImg::getSkuId,skuId);

        return baseMapper.selectList(queryWrapper);
    }
}
